home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
Xm
/
XmGetPixmap.z
/
XmGetPixmap
Wrap
Text File
|
1998-10-30
|
17KB
|
265 lines
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
NNNNAAAAMMMMEEEE
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp - A pixmap caching function that generates a
pixmap, stores it in a pixmap cache, and returns the pixmap
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
#include <Xm/Xm.h>
PPPPiiiixxxxmmmmaaaapppp XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp(
SSSSccccrrrreeeeeeeennnn ****ssssccccrrrreeeeeeeennnn,
cccchhhhaaaarrrr ****iiiimmmmaaaaggggeeee____nnnnaaaammmmeeee,
PPPPiiiixxxxeeeellll ffffoooorrrreeeeggggrrrroooouuuunnnndddd,
PPPPiiiixxxxeeeellll bbbbaaaacccckkkkggggrrrroooouuuunnnndddd);
VVVVEEEERRRRSSSSIIIIOOOONNNN
This page documents Motif 2.1.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaappppuses the parameter data to perform a lookup in
the pixmap cache to see if a pixmap has already been
generated that matches the data. If one is found, a
reference count is incremented and the pixmap is returned.
Applications should use XXXXmmmmDDDDeeeessssttttrrrrooooyyyyPPPPiiiixxxxmmmmaaaappppwhen the pixmap is no
longer needed.
_s_c_r_e_e_n Specifies the display screen on which the pixmap
is to be drawn. The depth of the pixmap is the
default depth for this screen.
_i_m_a_g_e__n_a_m_e
Specifies the name of the image to be used to
generate the pixmap
_f_o_r_e_g_r_o_u_n_d
Combines the image with the _f_o_r_e_g_r_o_u_n_d color to
create the pixmap if the image referenced is a
bit-per-pixel image
_b_a_c_k_g_r_o_u_n_d
Combines the image with the _b_a_c_k_g_r_o_u_n_d color to
create the pixmap if the image referenced is a
bit-per-pixel image
If a pixmap is not found, _i_m_a_g_e__n_a_m_e is used to perform a
lookup in the image cache. If an image is found, it is used
to generate the pixmap, which is then cached and returned.
If an image is not found, the _i_m_a_g_e__n_a_m_e is used as a
filename, and a search is made for an XXXX11110000 or XXXX11111111 bitmap
file. If it is found, the file is read, converted into an
image, and cached in the image cache. The image is then used
to generate a pixmap, which is cached and returned.
If _i_m_a_g_e__n_a_m_e has a leading slash (////), it specifies a full
Page 1 (printed 10/24/98)
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
pathname, and XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp opens the file as specified.
Otherwise, _i_m_a_g_e__n_a_m_e specifies a filename. In this case,
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp looks for the file along a search path specified
by the XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH environment variable or by a default
search path, which varies depending on whether or not the
XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR environment variable is set. The default search
path contains a lot of directories. Therefore, XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp
will need a relatively long time to search through all these
directories for pixmaps and bitmaps. Applications that use a
lot of pixmaps and bitmaps will probably run more quickly if
XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH is set to a short list of directories. In
addition to X bitmap files (XBM), Motif also supports XPM (X
Pixmap) file formats. The XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH specifies the path for
both XBM and XPM files. Refer to the XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaappppBBBByyyyDDDDeeeepppptttthhhh
reference page for further details.
The XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH environment variable specifies a search path
for X bitmap files. It can contain the substitution field
%%%%BBBB, where the _i_m_a_g_e__n_a_m_eargument to XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp is
substituted for %%%%BBBB. It can also contain the substitution
fields accepted by XXXXttttRRRReeeessssoooollllvvvveeeePPPPaaaatttthhhhnnnnaaaammmmeeee. The substitution
field %%%%TTTT is always mapped to _b_i_t_m_a_p_s, and %%%%SSSS is always
mapped to NULL.
If XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH is not set but the environment variable
XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR is set, the following pathnames are searched:
+o %%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
Page 2 (printed 10/24/98)
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
If neither XXXXBBBBMMMMLLLLAAAANNNNGGGGPPPPAAAATTTTHHHH nor XXXXAAAAPPPPPPPPLLLLRRRREEEESSSSDDDDIIIIRRRR is set, the following
pathnames are searched:
+o %%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o $$$$HHHHOOOOMMMMEEEE////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%NNNN////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%LLLL////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll____%%%%tttt////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////%%%%llll////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
+o ////uuuussssrrrr////lllliiiibbbb////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
Page 3 (printed 10/24/98)
XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaapppp((((3333XXXX))))
+o ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////XXXX11111111////bbbbiiiittttmmmmaaaappppssss////%%%%BBBB
These paths are defaults that vendors may change. For
example, a vendor may use different directories for
////uuuussssrrrr////lllliiiibbbb////XXXX11111111 and ////uuuussssrrrr////iiiinnnncccclllluuuuddddeeee////XXXX11111111.
The following substitutions are used in these paths:
%%%%BBBB The image name, from the _i_m_a_g_e__n_a_m_e argument
%%%%NNNN The class name of the application
%%%%LLLL The display's language string. This string is
influenced by XXXXttttSSSSeeeettttLLLLaaaannnngggguuuuaaaaggggeeeePPPPrrrroooocccc. The default
string is determined by calling setlocale(_L_C__A_L_L,
_N_U_L_L).
%%%%llll____%%%%tttt The language and territory component of the
display's language string
%%%%llll The language component of the display's language
string
The contents of the file must conform to the rules for X11
bitmap files. In other words, Motif can read any X11
conformant bitmap file.
RRRREEEETTTTUUUURRRRNNNN
Returns a pixmap when successful; returns
XXXXmmmmUUUUNNNNSSSSPPPPEEEECCCCIIIIFFFFIIIIEEEEDDDD____PPPPIIIIXXXXMMMMAAAAPPPPif the image corresponding to _i_m_a_g_e__n_a_m_e
cannot be found.
RRRREEEELLLLAAAATTTTEEEEDDDD
XXXXmmmmDDDDeeeessssttttrrrrooooyyyyPPPPiiiixxxxmmmmaaaapppp(3), XXXXmmmmGGGGeeeettttPPPPiiiixxxxmmmmaaaappppBBBByyyyDDDDeeeepppptttthhhh(3),
XXXXmmmmIIIInnnnssssttttaaaallllllllIIIImmmmaaaaggggeeee(3), and XXXXmmmmUUUUnnnniiiinnnnssssttttaaaallllllllIIIImmmmaaaaggggeeee(3).
Page 4 (printed 10/24/98)